//
//  WW_viewtool.h
//  yygroupon
//
//  Created by 谢世忠 on 15/5/23.
//  Copyright (c) 2015年 waste. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
@interface WW_viewtool : NSObject

/**
 *  生成UILabel
 *
 *  @param frame label frame
 *  @param color 字体颜色
 *  @param text  文本内容
 *  @param font  字体大小
 *  @param align 对齐方式
 *  @param tag   tag
 *
 *  @return UILabel
 */
+ (UILabel *)createLabel:(CGRect)frame andTextColor:(UIColor *)color
                 andText:(NSString *)text andFontsize:(CGFloat)fontsize
                andAlign:(NSTextAlignment)align Tag:(int)tag;

/**
 *  生成UIView
 *
 *  @param frame view frame
 *  @param color 背景颜色
 *
 *  @return UIView
 */
+ (UIView *)createView:(CGRect)frame BackColor:(UIColor *)color Tag:(int)tag;

/**
 *  生成UIButton
 *
 *  @param frame   button frame
 *  @param title   标题
 *  @param color   标题颜色
 *  @param imgname 背景图片
 *
 *  @return UIButton
 */
+ (UIButton *)createButton:(CGRect)frame Title:(NSString *)title
                TitleColor:(UIColor *)color Bgimage:(NSString *)imgname
                       Tag:(int)tag Font:(UIFont *)font;
/**
 *  生成line
 *
 *  @param frame view frame
 *
 *  @return UIView
 */
+ (UILabel *)createLine:(CGRect)frame;
@end
